
import sqlite3


class db:

	conn = None

	def mount( self , path ):
		self.conn = sqlite3.connect( path )


	def query( self , query ):
		c = self.conn.cursor()
		if not c.execute( query ):
			return None
		rows = c.fetchall()
		c.close()
		return rows


	def umount( self ):
		self.conn.close()



def sqlstr( string ):
	return string.replace( '\'' , '\\\'' )


